package staticClass.cookieMa;

import javax.servlet.http.Cookie;

public class CookieManage {
    public static Cookie getCookie(Cookie[] cookies, String cookieName) {

        if (cookies == null) {
            return null;
        }

        for (Cookie cookie :
                cookies) {
            if (cookie.getName().equals(cookieName)) {
                return cookie;
            }
        }
        return null;
    }

}
